var itemHeight = 40;

function openMenu(obj) {
    menu = document.getElementById('menu1');
    indicator = document.getElementById('indicator1');
    height = menu.style.height;

    if (height == "0px" || height == "") {
        childAmount = menu.getElementsByTagName('div').length;
        height = childAmount * itemHeight;
        menu.style.height = height + "px";
        indicator.style.transform = "rotate(-90deg)";
    } else {
        menu.style.height = "0px";
        indicator.style.transform = "rotate(0deg)";
    }
}

function mbar(sobj) {
    var docurl =sobj.options[sobj.selectedIndex].value;
    if (docurl != "") {
        open(docurl,'_self');
        sobj.selectedIndex=this.selectedIndex;
    }
}